
export function columnsScreen (menuId) {
	let columns = [];
	switch (menuId) {
		case 311:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left", sortable: true },
			{ name: "发货时间", prop: "fromTime", width: "", align: "left", sortable: true },
			{ name: "发货方名称", prop: "customerName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "重量（公斤）", prop: "totalWeight", width: "" },
			{ name: "体积（方）", prop: "totalVolume", width: "" },
			{ name: "收入（元）", prop: "amountIncome", width: "", sortable: true }]
			break
		case 367:
			columns = [{ name: "承运方名称", prop: "carrierName", width: "", align: "left" },
			{ name: "合同编号", prop: "contractNo", width: "", align: "left", sortable: true },
			{ name: "发货时间", prop: "fromTime", width: "", align: "left", sortable: true },
			{ name: "收货时间", prop: "toTime", width: "", align: "left" },
			{ name: "出发地", prop: "fromAddress", width: "", align: "left" },
			{ name: "目的地", prop: "toAddress", width: "", align: "left" },
			{ name: "绑定设备号", prop: "deviceCode", width: "", align: "center" },
			{ name: "设备最后定位时间", prop: "positionTime", width: "", align: "left" },
			{ name: "设备最后定位位置", prop: "positionAddress", width: "", align: "left" },
			{ name: "距离（签收地-收货地）", prop: "distance", width: "", align: "left" }]
			break
		case 368:
			columns = [{ name: "发货方名称", prop: "customerName", width: "", align: "left" },
			{ name: "合同编号", prop: "contractNo", width: "", align: "left", sortable: true },
			{ name: "发货时间", prop: "fromTime", width: "", align: "left", sortable: true },
			{ name: "收货时间", prop: "toTime", width: "", align: "left" },
			{ name: "出发地", prop: "fromAddress", width: "", align: "left" },
			{ name: "目的地", prop: "toAddress", width: "", align: "left" },
			{ name: "绑定设备号", prop: "deviceCode", width: "", align: "center" },
			{ name: "设备最后定位时间", prop: "positionTime", width: "", align: "left" },
			{ name: "设备最后定位位置", prop: "positionAddress", width: "", align: "left" },
			{ name: "距离（签收地-收货地）", prop: "distance", width: "", align: "left" }]
			break
		case 321:
		case 322:
			columns = [{ name: "合同编号", prop: "contractNo", width: "140px", align: "left", sortable: true },
			{ name: "发货时间", prop: "fromTime", width: "140px", align: "left", sortable: true },
			{ name: "发货方名称", prop: "customerName", width: "140px", align: "left", sortable: true },
			{ name: "承运方名称", prop: "carrierName", width: "140px", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "140px", align: "left" },
			{ name: "重量（公斤）", prop: "totalWeight", width: "100px" },
			{ name: "体积（方）", prop: "totalVolume", width: "90px" },
			{ name: "总成本（元）", prop: "amountCost", width: "100px", sortable: true },
			{ name: "零担费（元）", prop: "feeDivide", width: "100px" },
			{ name: "整车费（元）", prop: "feeWhole", width: "100px" },
			{ name: "提货费（元）", prop: "feePick", width: "100px" },
			{ name: "送货费（元）", prop: "feeDeliver", width: "100px" },
			{ name: "装货费（元）", prop: "feeLoad", width: "100px" },
			{ name: "卸货费（元）", prop: "feeUnload", width: "100px" },
			{ name: "补充费用（元）", prop: "feeSupplement", width: "110px" },
			{ name: "最低运费（元）", prop: "feeMin", width: "110" },
			{ name: "保险费（元）", prop: "feeInsure", width: "100px" },
			{ name: "税费（元）", prop: "feeTax", width: "90px" },]
			break
		case 323:
			columns = [{ name: "合同编号", prop: "contractNo", width: "140px", align: "left", sortable: true },
			{ name: "发货时间", prop: "fromTime", width: "140px", align: "left", sortable: true },
			{ name: "发货方名称", prop: "customerName", width: "140px", align: "left", sortable: true },
			{ name: "承运方名称", prop: "carrierName", width: "140px", align: "left", sortable: true },
			{ name: "收货方名称", prop: "consigneeName", width: "140px", align: "left" },
			{ name: "运输方式", prop: "shipModeName", width: "", align: "left" },
			{ name: "重量（公斤）", prop: "totalWeight", width: "160px" },
			{ name: "体积（方）", prop: "totalVolume", width: "160px" },
			{ name: "总成本（元）", prop: "amountCost", width: "160px", sortable: true },
			{ name: "零担费（元）", prop: "feeDivide", width: "160px" },
			{ name: "整车费（元）", prop: "feeWhole", width: "160px" },
			{ name: "提货费（元）", prop: "feePick", width: "100px" },
			{ name: "送货费（元）", prop: "feeDeliver", width: "100px" },
			{ name: "装货费（元）", prop: "feeLoad", width: "100px" },
			{ name: "卸货费（元）", prop: "feeUnload", width: "100px" },
			{ name: "补充费用（元）", prop: "feeSupplement", width: "110px" },
			{ name: "最低运费（元）", prop: "feeMin", width: "110px" },
			{ name: "保险费（元）", prop: "feeInsure", width: "100px" },
			{ name: "税费（元）", prop: "feeTax", width: "90px" },]
			break
		case 324:
			columns = [{ name: "合同编号", prop: "contractNo", width: "140px", align: "left", sortable: true },
			{ name: "发货时间", prop: "fromTime", width: "140px", align: "left", sortable: true },
			{ name: "发货方名称", prop: "customerName", width: "140px", align: "left", sortable: true },
			{ name: "承运方名称", prop: "carrierName", width: "140px", align: "left", sortable: true },
			{ name: "收货方名称", prop: "consigneeName", width: "140px", align: "left" },
			{ name: "运输模式", prop: "transportMode", width: "", align: "left" },
			{ name: "重量（公斤）", prop: "totalWeight", width: "160px" },
			{ name: "体积（方）", prop: "totalVolume", width: "160px" },
			{ name: "总成本（元）", prop: "amountCost", width: "160px", sortable: true },
			{ name: "零担费（元）", prop: "feeDivide", width: "160px" },
			{ name: "整车费（元）", prop: "feeWhole", width: "160px" },
			{ name: "提货费（元）", prop: "feePick", width: "100px" },
			{ name: "送货费（元）", prop: "feeDeliver", width: "100px" },
			{ name: "装货费（元）", prop: "feeLoad", width: "100px" },
			{ name: "卸货费（元）", prop: "feeUnload", width: "100px" },
			{ name: "补充费用（元）", prop: "feeSupplement", width: "140px" },
			{ name: "最低运费（元）", prop: "feeMin", width: "140px" },
			{ name: "保险费（元）", prop: "feeInsure", width: "100px" },
			{ name: "税费（元）", prop: "feeTax", width: "95px" },]
			break
		case 335:
			columns = [{ name: "合同编号", prop: "contractNo", width: "150px", align: "left", sortable: true },
			{ name: "发货时间", prop: "fromTime", width: "140px", align: "left", sortable: true },
			{ name: "发货方名称", prop: "customerName", width: "140px", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "140px", align: "left" },
			{ name: "重量（公斤）", prop: "totalWeight", width: "" },
			{ name: "体积（方）", prop: "totalVolume", width: "" },
			{ name: "收入（元）", prop: "amountIncome", width: "" },
			{ name: "成本（元）", prop: "amountCost", width: "" },
			{ name: "利润（元）", prop: "profits", width: "", sortable: true }]
			break
	}
	return columns;
};

//综合考核 table
export function evaluateScreen (num) {
	let columns = [];
	switch (num) {
		case 3181:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "发货方名称", prop: "customerName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "超时原因", prop: "reason", width: "", align: "left" }]
			break
		case 3321:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "承运方名称", prop: "carrierName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "超时原因", prop: "reason", width: "", align: "left" }]
			break
		case 3182:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "发货方名称", prop: "customerName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "超时原因", prop: "reason", width: "", align: "left" }]
			break
		case 3322:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "承运方名称", prop: "carrierName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "超时原因", prop: "reason", width: "", align: "left" }]
			break
		case 3183:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "发货方名称", prop: "customerName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "超时原因", prop: "reason", width: "", align: "left" }]
			break
		case 3323:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "承运方名称", prop: "carrierName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "超时原因", prop: "reason", width: "", align: "left" }]
			break
		case 3184:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "发货方名称", prop: "customerName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "实签数", prop: "totalQuantity", width: "", align: "left" },
			{ name: "异常数", prop: "totalExceptionQuantity", width: "", align: "left" }]
			break
		case 3324:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "承运方名称", prop: "carrierName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "实签数", prop: "totalQuantity", width: "", align: "left" },
			{ name: "异常数", prop: "totalExceptionQuantity", width: "", align: "left" }]
			break
		case 3185:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "发货方名称", prop: "customerName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "超时原因", prop: "reason", width: "", align: "left" }]
			break
		case 3325:
			columns = [{ name: "合同编号", prop: "contractNo", width: "", align: "left" },
			{ name: "发货城市", prop: "fromCity", width: "", align: "left" },
			{ name: "收货城市", prop: "toCity", width: "", align: "left" },
			{ name: "承运方名称", prop: "carrierName", width: "", align: "left" },
			{ name: "收货方名称", prop: "consigneeName", width: "", align: "left" },
			{ name: "超时原因", prop: "reason", width: "", align: "left" }]
			break
	}
	return columns;
};

export function derives (menuId) {
	let derive = {};
	switch (menuId) {
		case 311:
			derive = { name: "发货方报表-营业额报表-明细", type: 109 }
			break
		case 321:
			derive = { name: "承运方报表-承运方成本报表-明细", type: 122 }
			break
		case 322:
			derive = { name: "承运方报表-收货方成本报表-明细", type: 123 }
			break
		case 323:
			derive = { name: "承运方报表-运输方式成本报表-明细", type: 124 }
			break
		case 324:
			derive = { name: "承运方报表-运输模式成本报表-明细", type: 125 }
			break
		case 335:
			derive = { name: "利润报表-发货方利润报表-明细", type: 97 }
			break
		case 367:
			derive = { name: "承运方货物状态-明细", type: 76 }
			break
		case 368:
			derive = { name: "发货方货物状态-明细", type: 78 }
			break
	}
	return derive;
};

//综合考核明细导出
export function evaluate (num) {
	let derive = {};
	switch (num) {
		case 3181:
			derive = { name: "发货方报表-提货超时率-明细", type: 74 }
			break
		case 3182:
			derive = { name: "发货方报表-送货超时率-明细", type: 68 }
			break
		case 3183:
			derive = { name: "发货方报表-签收超时率-明细", type: 72 }
			break
		case 3184:
			derive = { name: "发货方报表-货物异常率-明细", type: 70 }
			break
		case 3185:
			derive = { name: "发货方报表-回单超时率-明细", type: 66 }
			break
		case 3321:
			derive = { name: "承运方报表-提货超时率-明细", type: 75 }
			break
		case 3322:
			derive = { name: "承运方报表-送货超时率-明细", type: 69 }
			break
		case 3323:
			derive = { name: "承运方报表-签收超时率-明细", type: 73 }
			break
		case 3324:
			derive = { name: "承运方报表-货物异常率-明细", type: 71 }
			break
		case 3325:
			derive = { name: "承运方报表-回单超时率-明细", type: 67 }
			break
	}
	return derive;
};
//科学计数法
export function getFullNum (nStr) {
	nStr += '';
	let x = nStr.split('.');
	let x1 = x[0];
	let x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;   //3就是间隔的位数
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}
